<?php
/**
 * Created by JetBrains PhpStorm.
 * User: shaoshuai
 * Date: 11-10-2
 * Time: PM9:08
 * To change this template use File | Settings | File Templates.
 */

include_once '../common.func.php';
$key = trim($_POST['key']);
$vid = md5($key . $_POST['name'] . microtime());
$comment = array(
    'id' => trim($_POST['key']),
    'name' => trim($_POST['name']),
    'mail' => trim($_POST['mail']),
    'website' => trim($_POST['website']),
    'content' => trim($_POST['content']),
    'time' => date('Y-m-d H:i:s'),
    'verify_url' => VERIFY_URL . $vid,
    'verify_delete' => VERIFY_URL . $vid . '&delete=1',
    'vid' => $vid,
);

addVerify($comment);
header('Location: ' . SITE_URL . '/post/' . $key . '.html?status=verify');
